package com.siwei.mes.enums;

import lombok.Getter;

import java.util.Arrays;

/**
 * 试验项目枚举类
 *
 * @Description: 试验项目枚举类
 * @Version: 1.0
 * @author: mlchen
 * @date: 2024/4/8 22:57
 */
@Getter
public enum TestProjectEnum {
    /**
     * 矿渣粉
     */
    SLAG_PARAM_KZF_YPMD("SLAG_PARAM_KZF_YPMD", "密度"),
    SLAG_PARAM_KZF_BBMJ("SLAG_PARAM_KZF_BBMJ", "比表面积"),
    SLAG_PARAM_KZF_LDDB("SLAG_PARAM_KZF_LDDB", "流动度比"),
    SLAG_PARAM_KZF_HXZS("SLAG_PARAM_KZF_HXZS", "活性指数"),
    SLAG_PARAM_KZF_HSL("SLAG_PARAM_KZF_HSL", "含水量"),
    SLAG_PARAM_KZF_SSL("SLAG_PARAM_KZF_SSL", "烧矢量"),
    SLAG_PARAM_KZF_SYHL("SLAG_PARAM_KZF_SYHL", "三氧化硫"),
    /**
     * 粉煤灰的
     */
    FLY_ASK_PARAM_FMH_XD("FLY_ASK_PARAM_FMH_XD", "细度"),
    FLY_ASK_PARAM_FMH_SSL("FLY_ASK_PARAM_FMH_SSL", "烧矢量"),
    FLY_ASK_PARAM_FMH_XSLB("FLY_ASK_PARAM_FMH_XSLB", "需水量比"),
    FLY_ASK_PARAM_FMH_HSL("FLY_ASK_PARAM_FMH_HSL", "含水量"),
    FLY_ASK_PARAM_FMH_SYHL("FLY_ASK_PARAM_FMH_SYHL", "三氧化硫"),
    FLY_ASK_PARAM_FMH_YLYHG("FLY_ASK_PARAM_FMH_YLYHG", "游离氧化钙"),
    FLY_ASK_PARAM_FMH_ADX("FLY_ASK_PARAM_FMH_ADX", "安定性"),
    FLY_ASK_PARAM_FMH_HXZS("FLY_ASK_PARAM_FMH_HXZS", "活性指数"),
    /**
     * 外加剂的
     */
    CONCRETE_ADMIXTURE_PARAM_WJJ_PHZ("CONCRETE_ADMIXTURE_PARAM_WJJ_PHZ", "PH值"),
    CONCRETE_ADMIXTURE_PARAM_WJJ_HGL("CONCRETE_ADMIXTURE_PARAM_WJJ_HGL", "含固量"),
    CONCRETE_ADMIXTURE_PARAM_WJJ_MD("CONCRETE_ADMIXTURE_PARAM_WJJ_MD", "密度"),
    CONCRETE_ADMIXTURE_PARAM_WJJ_NJSJZC("CONCRETE_ADMIXTURE_PARAM_WJJ_NJSJZC", "凝结时间之差"),
    CONCRETE_ADMIXTURE_PARAM_WJJ_QSLB("CONCRETE_ADMIXTURE_PARAM_WJJ_QSLB", "泌水率比"),
    CONCRETE_ADMIXTURE_PARAM_WJJ_TLD1HJSBHL("CONCRETE_ADMIXTURE_PARAM_WJJ_TLD1HJSBHL", "塌落度1h经时变化量"),
    CONCRETE_ADMIXTURE_PARAM_WJJ_JSL("CONCRETE_ADMIXTURE_PARAM_WJJ_JSL", "减水率"),
    /**
     * 粗骨料的
     */
    COARSE_AGGREGATE_PARAM_CGL_HNL("COARSE_AGGREGATE_PARAM_CGL_HNL", "含泥量"),
    COARSE_AGGREGATE_PARAM_CGL_HNKL("COARSE_AGGREGATE_PARAM_CGL_HNKL", "含泥块量"),
    COARSE_AGGREGATE_PARAM_CGL_ZPZKLHL("COARSE_AGGREGATE_PARAM_CGL_ZPZKLHL", "针、片状颗粒含量"),
    COARSE_AGGREGATE_PARAM_CGL_SFX("COARSE_AGGREGATE_PARAM_CGL_SFX", "筛分析"),
    COARSE_AGGREGATE_PARAM_CGL_YSZZB("COARSE_AGGREGATE_PARAM_CGL_YSZZB", "压碎值指标"),
    COARSE_AGGREGATE_PARAM_CGL_BGMD("COARSE_AGGREGATE_PARAM_CGL_BGMD", "表观密度"),
    COARSE_AGGREGATE_PARAM_CGL_DJMD("COARSE_AGGREGATE_PARAM_CGL_DJMD", "堆积密度"),
    COARSE_AGGREGATE_PARAM_CGL_JMMD("COARSE_AGGREGATE_PARAM_CGL_JMMD", "紧密密度"),
    /**
     * 细骨料的
     */
    FINE_AGGREGATE_PARAM_XGL_NKHL("FINE_AGGREGATE_PARAM_XGL_NKHL", "泥块含量"),
    FINE_AGGREGATE_PARAM_XGL_SFX("FINE_AGGREGATE_PARAM_XGL_SFX", "筛分析"),
    FINE_AGGREGATE_PARAM_XGL_HSL("FINE_AGGREGATE_PARAM_XGL_HSL", "含水量"),
    FINE_AGGREGATE_PARAM_XGL_HNL("FINE_AGGREGATE_PARAM_XGL_HNL", "含泥量"),
    FINE_AGGREGATE_PARAM_XGL_YMHL("FINE_AGGREGATE_PARAM_XGL_YMHL", "云母含量"),
    FINE_AGGREGATE_PARAM_XGL_YSZZB("FINE_AGGREGATE_PARAM_XGL_YSZZB", "压碎值指标"),
    FINE_AGGREGATE_PARAM_XGL_DJMD("FINE_AGGREGATE_PARAM_XGL_DJMD", "堆积密度"),
    FINE_AGGREGATE_PARAM_XGL_LLZHL("FINE_AGGREGATE_PARAM_XGL_LLZHL", "氯离子含量"),
    FINE_AGGREGATE_PARAM_XGL_BGMD("FINE_AGGREGATE_PARAM_XGL_BGMD", "表观密度"),
    FINE_AGGREGATE_PARAM_XGL_BKHL("FINE_AGGREGATE_PARAM_XGL_BKHL", "贝壳含量"),
    FINE_AGGREGATE_PARAM_XGL_JMMD("FINE_AGGREGATE_PARAM_XGL_JMMD", "紧密密度"),
    FINE_AGGREGATE_PARAM_XGL_JSLDD("FINE_AGGREGATE_PARAM_XGL_JSLDD", "胶砂流动度"),

    /**
     * 水泥的
     */
    CEMENT_PARAM_KJ("CEMENT_PARAM_KJ", "快检"),
    CEMENT_PARAM_BZCD("CEMENT_PARAM_BZCD", "标准稠度"),
    CEMENT_PARAM_NJSJ("CEMENT_PARAM_NJSJ", "凝结时间"),
    CEMENT_PARAM_ADX("CEMENT_PARAM_ADX", "安定性"),
    CEMENT_PARAM_QDCD("CEMENT_PARAM_QDCD", "强度测定"),
    CEMENT_PARAM_LDX("CEMENT_PARAM_LDX", "流动性"),
    CEMENT_PARAM_XD("CEMENT_PARAM_XD", "细度"),
    CEMENT_PARAM_MD("CEMENT_PARAM_MD", "密度"),
    CEMENT_PARAM_BBMJ("CEMENT_PARAM_BBMJ", "比表面积"),

    /**
     * 混凝土的
     */
    CONCRETE_PARAM_MCSL("CONCRETE_PARAM_MCSL", "目测砂率"),
    CONCRETE_PARAM_MCTLD("CONCRETE_PARAM_MCTLD", "目测坍落度"),
    CONCRETE_PARAM_ZJX("CONCRETE_PARAM_ZJX", "粘聚性"),
    CONCRETE_PARAM_BSX("CONCRETE_PARAM_BSX", "保水性"),
    CONCRETE_PARAM_KYQD("CONCRETE_PARAM_KYQD", "抗压强度"),
    CONCRETE_PARAM_KSDJ("CONCRETE_PARAM_KSDJ", "抗渗等级"),
    CONCRETE_PARAM_KZQD("CONCRETE_PARAM_KZQD", "抗折强度"),
    CONCRETE_PARAM_JHL("CONCRETE_PARAM_JHL", "碱含量"),

    CONCRETE_PARAM_XNBG_TLD("CONCRETE_PARAM_XNBG_TLD", "性能报告-坍落度"),
    CONCRETE_PARAM_XNBG_HQL("CONCRETE_PARAM_XNBG_HQL", "性能报告-含气量"),
    CONCRETE_PARAM_XNBG_CNSJ("CONCRETE_PARAM_XNBG_CNSJ", "性能报告-初凝时间"),
    CONCRETE_PARAM_XNBG_ZNSJ("CONCRETE_PARAM_XNBG_ZNSJ", "性能报告-终凝时间"),
    CONCRETE_PARAM_XNBG_LLZHL("CONCRETE_PARAM_XNBG_LLZHL", "性能报告-氯离子含量"),
    CONCRETE_PARAM_XNBG_MSL("CONCRETE_PARAM_XNBG_MSL", "性能报告-泌水率"),
    CONCRETE_PARAM_XNBG_KZD("CONCRETE_PARAM_XNBG_KZD", "性能报告-扩展度"),

    /**
     * 其它的分类
     */
    ZONG_HE_XING_NENG("ZONG_HE_XING_NENG", "综合性能报告");

    private final String code;

    private final String name;

    TestProjectEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    /**
     * 根据code查找枚举信息
     *
     * @param code 试验项目code
     * @return
     */
    public static TestProjectEnum getName(String code) {
        return Arrays.stream(values()).filter(e -> e.getCode().equals(code)).findFirst().orElse(null);
    }
}
